<!-- 顶部区域 -->
<div class="layui-header header header-demo">
    <div class="layui-main">
        <!-- logo区域 -->
        <div class="admin-logo-box">
            <a class="logo" href="javascript:;" title="logo"><img src="/Public/Admin/images/oalogo.svg" /></a>
<!--            <div class="larry-side-menu">
                <i class="fa fa-bars" aria-hidden="true"></i>
            </div>-->
            <div class="larry-side-menu">
                <i class="iconfont" aria-hidden="true" style="color:#5f6bac;font-size:30px;line-height: 39px">
                    &#xe606;
                </i>
            </div>
            <div class="fullscreen">
                <i class="iconfont" onclick="fullScreen()" style="color:#5f6bac;font-size:26px;line-height:31px">&#xe64c;</i>
                <!--<img src="/Public/Admin/images/fullScreen.png"  />-->
            </div>
        </div>
        <!-- 右侧导航 -->
        <ul class="layui-nav larry-header-item">
            <li class="layui-nav-item">
                <a href="javascript:;" style="padding-right:25px;">
                    <img class="headImg" src="<if condition='$userinfo[head] neq null'>{$userinfo.head}<elseif condition='$userinfo[sex] eq 1'/>/Public/Admin/images/man.png<else />/Public/Admin/images/woman.png</if>">
                    <cite>{$userinfo.user_name}</cite>
                    <!--<span class="layui-nav-more" style="right:17px;"></span>-->
                </a>
<!--                <dl class="layui-nav-child">
                    <dd>
                        <a class="exit pointer" data-url="{:U('Login/logout')}">退出</a>
                    </dd>
                </dl>-->
            </li>
            <li class="layui-nav-item">
                <a href="javascript:;" style="padding-right:25px;">
                    <i class="layui-icon"><img src="/Public/Admin/images/user.png" /></i>
                    <span class="layui-badge-dot">{$attendCount}</span>
                    <span class="layui-nav-more" style="right:10px;"></span>
                </a>
                <div class="layui-nav-child stateBox" id="stateBox">
                    <div class="search">
                        <i class="layui-icon layui-icon-notice"><img src="/Public/Admin/images/searchiIcon.png" /></i>
                        <input type="text" placeholder="搜索人员" class="searchUser" value="" data-url="{:U(searchUser)}"/>
                    </div>
                    <ul>
                        <li class="item item-hide" state="hide">
                            <a>
                                <span>外出人员</span>
                                <label class="color1">{$outCount}</label>
                                <em class="arrow"></em>
                            </a>
                            <dl>
                                <foreach name="outList" item="out">
                                    <dd>
                                        <img src="{$out.head|default='/Public/Admin/images/man.png'}" />
                                        <span>{$out.user_id|getChineseName}</span>
                                    </dd>
                                </foreach>
                            </dl>
                        </li>
                        <li class="item item-hide" state="hide">
                            <a>
                                <span>出差人员</span>
                                <label class="color3">{$evectionCount}</label>
                                <em class="arrow"></em>
                            </a>
                            <dl>
                                <foreach name="evectionList" item="evection">
                                    <dd>
                                        <img src="{$evection.head|default='/Public/Admin/images/man.png'}" />
                                        <span>{$evection.user_id|getChineseName}</span>
                                    </dd>
                                </foreach>
                            </dl>
                        </li>
                        <li class="item item-hide" state="hide">
                            <a>
                                <span>请假人员</span>
                                <label class="color2">{$leaveCount}</label>
                                <em class="arrow"></em>
                            </a>
                            <dl>
                                <foreach name="leaveList" item="leave">
                                    <dd>
                                        <img src="{$leave.head|default='/Public/Admin/images/man.png'}" />
                                        <span>{$leave.user_id|getChineseName}</span>
                                    </dd>
                                </foreach>
                            </dl>
                        </li>
                    </ul>
                </div>
            </li>
        </ul>
    </div>
</div>
<script>
    $(initLogin());
    
    $("#stateBox>ul").height(window.innerHeight - 135);
    $(document).on("click", "#stateBox li>a", function () {
        var state = $(this).parents("li").attr("state");
        if (state == "hide") {
            $(this).parents("li").attr("state", "show");
            $(this).parents("li").addClass("item-show").removeClass("item-hide");
        } else if (state == "show") {
            $(this).parents("li").attr("state", "hide");
            $(this).parents("li").addClass("item-hide").removeClass("item-show");
        }
    })

    
    //全屏
    function fullScreen() {
        var el = document.documentElement;
        var rfs = el.requestFullScreen || el.webkitRequestFullScreen || 
        el.mozRequestFullScreen || el.msRequestFullScreen;
        if(typeof rfs != "undefined" && rfs) {
            rfs.call(el);
        } else if(typeof window.ActiveXObject != "undefined") {
    //for IE，这里其实就是模拟了按下键盘的F11，使浏览器全屏
            var wscript = new ActiveXObject("WScript.Shell");
            if(wscript != null) {
                    wscript.SendKeys("{F11}");
            }
        }
    }
</script>

